home *** CD-ROM | disk | FTP | other *** search
- Path: seas.gwu.edu!spiffy
- From: spiffy@seas.gwu.edu (Marc Goldberg)
- Newsgroups: gwu.seas,comp.lang.c
- Subject: help: gcc
- Date: 8 Mar 1996 15:08:45 GMT
- Organization: George Washington University
- Message-ID: <4hpiht$1n2@cronkite.seas.gwu.edu>
- NNTP-Posting-Host: 128.164.9.3
- X-Newsreader: TIN [version 1.2 PL2]
-
-
- Trying to compile a program on Solaris 2.5, I've removed all bugs (syntax
- errors, at least) but these. Any help would be *greatly* appreciated.
-
- Thanks,
- --Marc
-
- ~~~~~
- spiffy@felix:5: gcc 2FarmCheck.c
- 2FarmCheck.c: In function `readHostFiles':
- 2FarmCheck.c:23: dereferencing pointer to incomplete type
- 2FarmCheck.c:25: dereferencing pointer to incomplete type
- 2FarmCheck.c:27: warning: passing arg 3 of `fgets' from incompatible
- pointer type
- 2FarmCheck.c: In function `main':
- 2FarmCheck.c:66: storage size of `PID' isn't known
- ~~~~~~
-
- The lines referred to are:
-
- char *readHostFiles(char *name)
- {
- int foo;
- struct FILE *fileDisc;
-
- (23) *fileDisc = fopen("/users/spiffy/urls.txt", O_RDONLY);
-
- (25) while (!feof(fileDisc))
- {
- (27) if ( fgets(name, HOSTNAMESIZE, fileDisc) != name)
- exit(12);
- }
- return name;
- }
- |
- |
- |
- int main(void)
- {
- (66) struct pid_t PID;
- char name[HOSTNAMESIZE]; /*Hostname of server to check on*/
-
- PID = getpid();
- ...other stuff...
- }
-